package cn.ronghuanet.basic.utils;

/*@Data
@NoArgsConstructor
@AllArgsConstructor*/
public class AjaxResult {

    // 是否操作成功 true 成功 false失败
    private Boolean success = true;
    // 提示信息
    private String message = "操作成功!";
    // 返回的数据 - 查询接口需要使用
    private Object dataObj;

    // 提供静态方法,创建AjaxResult对象
    public static AjaxResult me(){
        return new AjaxResult();
    }

    public Boolean getSuccess() {
        return success;
    }

    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        // 返回当前对象
        return this;
    }

    public String getMessage() {
        return message;
    }

    public AjaxResult setMessage(String message) {
        this.message = message;
        return this;
    }

    public Object getDataObj() {
        return dataObj;
    }

    public AjaxResult setDataObj(Object dataObj) {
        this.dataObj = dataObj;
        return this;
    }
}
